<template>
  <div class="body">
    <!--演员介绍-->
    <!--dialogTableVisible-->
    <el-dialog width="1040px" title="演员介绍" :visible.sync="dialogTableVisible">
      <!--排版开始-->
      <div class="actro">
        <div class="img">
          <img :src="actor.image" alt="">
        </div>
        <!--基本信息-->
        <div class="info">
            <h1>{{actor.nameCn}}</h1>
            <h1>{{actor.nameEn}}</h1>
            <div >{{actor.birthYear}}-{{actor.birthMonth}}-{{actor.birthDay}} <span class="el-icon-location"></span>{{actor.address}}</div>
            <el-progress  type="circle"  :percentage="actor.ratingFinal*10"></el-progress><span style="color: red">粉丝好感度</span>
            <div style="text-indent: 2ex;display: inline-block">
              {{actor.content}}
            </div><span style="color: cadetblue;display: block">更多资料......</span>
        </div>
        <!--最新的照片-->
        <div class="new_img">
            <h2 style="color: red;margin-left: 10px">最新照片</h2>
            <!--具体照片-->
            <div v-for="v in actor.images" class="new_div">
              <img :src="v.image" alt="">
            </div>
        </div>
        <!--最新的作品-->
        <div class="new_works">
          <h2 style="color: red;margin-left: 10px">最新作品</h2>
          <div class="d_info_1">
            <img width="230px" height="290px" :src="actor.hotMovie.movieCover" alt="">
            <div>{{actor.hotMovie.movieTitleCn}}</div>
            <div>饰 {{actor.hotMovie.roleName}}</div>
          </div>
        </div>

      </div>
    </el-dialog>
    <!--导航-->
    <el-breadcrumb id="arrow" separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>电影详情</el-breadcrumb-item>
    </el-breadcrumb>
    <!--电影详情-->
    <div class="movie">
      <!--头部（介绍）-->
      <div class="m_head">
        <!--图片框（左）-->
        <div class="head_1">
          <img class="img" :src="movie.basic.img" alt="">
        </div>
        <!--基本信息（右）-->
        <div class="head_info">
          <div>影片名称<span>{{movie.basic.name}} </span></div>
          <div>导演<span>{{movie.basic.director.name}} </span></div>
          <div>评分<span>{{movie.basic.overallRating}} </span></div>
          <div>国家地区<span>{{movie.basic.releaseArea}} </span></div>
          <div>时长<span>{{movie.basic.mins}} </span></div>
          <div>总结<span>{{movie.basic.commentSpecial}} </span></div>
          <div>上映日期<span>{{movie.basic.releaseDate}} </span></div>
          <div>单日票房<span>{{movie.basic.showDay}} </span></div>
        </div>
      </div>
      <!--剧情介绍-->
      <div class="drama">
        <div style="color: cadetblue;font-size: 20px;margin-top: 10px">剧情简介 · · · · · ·</div>
        <div style="text-indent: 2em;line-height: 25px;margin-top: 10px;margin-bottom: 20px">
          {{movie.basic.story}}
        </div>
      </div>
      <!--演员介绍-->
      <div  class="actor">
        <div style="color: cadetblue;font-size: 20px;margin-top: 10px">演员介绍 · · · · · ·</div>
        <!--演员图片-->
        <div @click="go(v.actorId)" v-for=" v in movie.basic.actors " class="actor_img">
          <img :src="v.img" alt="">
          <div>{{v.name}}</div>
          <div style="color: #b4bccc">饰 {{v.roleName}}</div>
        </div>
      </div>
      <!--剧照-->
      <div class="still">
        <div style="color: cadetblue;font-size: 20px;margin-top: 10px">相关剧照 · · · · · ·</div>
        <div v-for=" v in movie.basic.stageImg.list " class="still_img">
          <img :src="v.imgUrl" alt="">
        </div>
      </div>
      <!--视频-->
      <div class="video">
        <div style="color: cadetblue;font-size: 20px;margin-top: 10px">相关视频 <span style="color: red;font-size: 9px;margin-left: 20px">视频连接不稳定，有部分视频可能不可用！请刷新再试</span></div>
        <!--<embed src="https://vfx.mtime.cn/Video/2017/09/06/mp4/170906201852246199.mp4" />-->
        <div  v-for="v in video" class="video_detail">
          <div style="margin-top: 5px;color: cadetblue">{{v.title}}</div>
          <video controls="" :poster="v.image"  >
          <source :src="v.url.replace('https','http')" >
        </video>
         <!-- {{v.hightUrl.replace('https','http')}}-->
         <!-- <embed :src="v.hightUrl.replace('http','https')" />-->
        </div>
      </div>

    </div>
  </div>


</template>

<style scoped>
  .body{
    //border: 1px solid black;
    height: auto;
    width: 1300px;
    margin: 5% auto;
    overflow: hidden;
  }
  #arrow{
    font-size: 20px;
  }
  .movie{
    //border: 1px solid red;
    margin-top: 50px;
    width: 1300px;
    height: auto;
  }
  .m_head{
    //border: 1px solid rebeccapurple;
    width: 1200px;
    height: 500px;
    margin: 10px auto;
    border-bottom: 2px solid #E5E5E5;
  }
  .head_1{
    border: 2px solid rosybrown;
    width: 320px;
    height: 460px;
    margin-left: 20%;
    margin-top: 10px;
    border-radius: 15px;
    box-shadow:0 0 10px #666;
    text-align: center;
    float: left;
  }
  .head_1 .img{
    width: 300px;
    height: 440px;
    margin: 10px;
    border-radius: 12px;
    //border: 1px solid black ;
  }
  .head_info{
    //border: 1px solid red;
    width: auto;
    height: auto;
    float: left;
    line-height: 50px;
    margin-top: 5%;
    margin-left: 8%;
  }
  .head_info div{
    font-size: 20px;
  }
  .head_info div span{
    display: inline-block;
    margin-left: 30px;
    color: cadetblue;
  }
  .drama{
    //border: 1px solid rebeccapurple;
    width: 1200px;
    height:auto;
    margin: 0 auto;
    border-bottom: 2px solid #E5E5E5;
  }
  .actor{
    //border: 1px solid rebeccapurple;
    width: 1200px;
    height: auto;
    margin: 10px auto;
    overflow: hidden;
    border-bottom: 2px solid #E5E5E5;
  }
  .actor_img{
    border: 1px rosybrown;
    height: 405px;
    width: 280px;
    line-height: 30px;
    text-align: center;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow:0 0 20px #666;
    margin-left: 10px;
    margin-bottom: 20px;
    transition: all 2s;
    margin-right: 10px;
    float: left;
  }
  .actor_img:hover{
    cursor:pointer;
    transform: scale(0.8,0.8);
  }
  .actor_img img{
    margin-top: 10px;
    border-radius: 5px;
    width: 230px;
    height: 320px;
  }
  .still{
    //border: 1px solid rebeccapurple;
    width: 1200px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    border-bottom: 2px solid #E5E5E5;
  }
  .still img{
    width: 410px;
    height: 220px;
    border-radius: 15px;
    margin-top: 15px;
    //box-shadow:0 0 20px #666;
    //transition: all 2s;
  }
  /*.still img:hover{*/
    /*cursor:pointer;*/
    /*transform: scale(1.2,1.2);*/
  /*}*/
  .still_img{
    border-radius: 15px;
    border: 1px rosybrown;
    width: 500px;
    height: 250px;
    text-align: center;
    box-shadow:0 0 20px #666;
    transition: all 2s;
    float: left;
    margin-left: 35px;
    margin-top: 30px;
    margin-right: 50px;
    margin-bottom: 50px;

  }
  .still_img:hover{
    cursor:pointer;
    transform: scale(1.1,1.1);
  }
  .video{
    //border: 1px solid red;
    width: 1200px;
    height:auto;
    margin: 20px auto;
    overflow: hidden;
  }
  .video_detail{
    //border: 1px solid red;
    width: 500px;
    height:310px;
    margin-left: 30px;
    margin-top: 20px;
    text-align: center;
    box-shadow:0 0 10px #666;
    border-radius: 15px;
    margin-bottom: 20px;
    float: left;
    transition: all 0.5s;
  }
  .video_detail video{
    width: 450px;
    margin-top: 20px;
    //border: 1px solid red;
    border-radius: 15px;
    //box-shadow:0 0 10px #666;
  }
  .video_detail:hover{
    cursor:pointer;
    transform: scale(1.1,1.1);
  }
  .actro{
    //border: 1px solid rebeccapurple;
    width: 1000px;
    height: auto;
    overflow: hidden;
    border-top: 2px solid #E5E5E5;
  }
  .img{
    //border: 1px solid red;
    width: 300px;
    height: 450px;
    text-align: center;
    border-radius: 20px;
    margin-left: 15px;
    margin-top: 8%;
    box-shadow: 0 0 5px #6666;
    float: left;

  }
  .img img{
    width: 290px;
    height: 440px;
    margin-top: 5px;
    border-radius: 20px;
  }
  .info{
    float: right;
    //border: 1px solid red;
    width: 635px;
    height: auto;
    margin-top: 10px;
    line-height: 35px;
  }
  .new_img{
    //border: 1px solid red;
    float: left;
    width: 1000px;
    height: auto;
    margin-top: 20px;
    border-top: 2px solid #E5E5E5;
  }
  .new_div{
    //border: 1px solid royalblue;
    width: 360px;
    height: 310px;
    text-align: center;
    margin-left: 100px;
    margin-bottom: 20px;
    box-shadow: 0 0 5px #666;
    border-radius: 10px;
    float: left;

  }
  .new_div img{
    width: 350px;
    height: 300px;
    margin-top: 5px;
    border-radius: 10px;
  }
  .new_works{
    float: left;
    //border: 1px solid rebeccapurple;
    width: 1000px;
    height: auto;
    margin-top: 20px;
    //border-top: 2px solid #E5E5E5;
    border-top: 2px solid #E5E5E5;
    border-bottom: 2px solid #E5E5E5 ;
  }
  .d_info_1{
    //border: 1px solid saddlebrown;
    height: 380px;
    width: 280px;
    margin-left: 20px;
    text-align: center;
    box-shadow: 0 0 5px #666;
    margin-bottom: 20px;
    border-radius: 5px;
  }
  .d_info_1 img{
    margin-top: 20px;
  }





</style>

<script>
  import axios from 'axios'
  export default {
    data(){
      return {
        movie:{},
        /*视频*/
        video:{},
        page:1,
        page_total:0,
        dialogTableVisible: false,
        /*演员*/
        actor:{
          hotMovie:{},
        },
      }
    },
    created(){
      //影片
       let url='https://www.dragonjun.com/jersey/api/query/get_movie';
       let data=JSON.stringify({"type":7,"movieId":this.$route.params.id,"page":1});
      axios.post(url,data,{
        headers: {
          'Content-Type': 'application/json',
        }
      }).then((data)=>{
        //console.log(data);
        this.page_total=data.data.data.totalPageCount;
        //console.log(this.page_total);
        this.video=data.data.data.videoList;
        console.log(this.video);
        //this.loading_movie=false;
      }).catch((error)=>{
        console.log(error);
      });
      /*初始化数据*/
       url='https://www.dragonjun.com/jersey/api/query/get_movie';
       data=JSON.stringify({"type":3,"movieId":this.$route.params.id});
      axios.post(url,data,{
        headers: {
          'Content-Type': 'application/json',
        }
      }).then((data)=>{
        //console.log(data);
       // this.page_total=data.data
        this.movie=data.data.data.data;
        //console.log(this.movie);
        //this.loading_movie=false;
      }).catch((error)=>{
        console.log(error);
      });
    },
    methods:{
      go(id){
        //取数据
        let url='https://www.dragonjun.com/jersey/api/query/get_movie';
        let data=JSON.stringify({"type":8,"actorId":id});
        axios.post(url,data,{
          headers: {
            'Content-Type': 'application/json',
          }
        }).then((data)=>{
          //console.log(data);
           this.actor=data.data.data.data.background;
          //console.log(this.actor);
        }).catch((error)=>{
          console.log(error);
        });

        this.dialogTableVisible = true

      }

    }


  }


</script>
